<?php
/**
 *
 * User: JSparrow
 * DateTime: 2016/11/24 16:29
 * Created by PhpStorm.
 */

namespace app\modules\admin\models\form;


use app\modules\admin\components\BaseForm;

class CategoryForm extends BaseForm
{
    public $id;
    public $pid;
    public $postion;
    public $title;
    public $hide;
    public $image;
    public $icon;
    public $status;

    public function rules()
    {
        return [
            [['title'], 'required'],
        ];
    }

    public function scenarios()
    {
        return array_merge(parent::scenarios(), [
            self::SCENARIO_CREATE => ['title'],
            self::SCENARIO_UPDATE => ['title'],
        ]);
    }


    public function create()
    {
        return false;
    }

    public function update()
    {
        return false;
    }


}